 const str = 'hello world\n ES6'
 // console.log(str);
 // console.log(str.includes('ell'));
 // console.log(str.startsWith('hello'));
 // console.log(str.repeat(2));
 // console.log(str.length);
 // console.log(str.padStart(20, " "));
 // console.log(str.padEnd(22, "a"));
 let str2 = `hello
    this br string`;
 const name = `张三`;
 const age = '18'
 console.log(`${name}年龄${age}`);
 // alert`hello` 
 let arr = [1, 3, 2, 5, 6, 4]
 // console.log(Math.max(...arr));
 // console.log(Math.min(...arr));
 let arr2 = [...arr]
 // let arr2 = arr;
 console.log(arr2 == arr);
 // arr2.push([7, 8, 9])           
 // console.log(arr2);
 console.log(JSON.stringify(arr2));
 let obj = {
     0: '344',
     1: 'hello',
     2: 'world',
     3: '222',
     4: false,
     length: 6
 }
 // console.log(Array.from(obj));//转换成为array数组
 // Array.from(obj).forEach((el) => {
 //     console.log(el);
 // })
 let set = new Set([1, 2, 4, 3])
 // console.log(set.length);//Set不能直接求length
 // console.log(set.add(2));//Set无序且非重复
 // console.log(Array.from(set, x => {  
 //     return x * x;
 // }));
 // console.log(Array.from(set, x => x * x));
 // console.log(Array.from(new Map(["name", "hha"])));
 let array = new Array();
 array = [2, 3, 6, 4]
 // console.log(array);
 // console.log(Array.of(2));

 // console.log(array.find((el) => {
 //     return el > 3//返回第一个符合条件的值，使用lambda更方便一些
 // }));
 // console.log(array.findIndex((el) => {
 //     return el > 3//返回第一个符合条件的索引
 // }));

 // console.log(array.includes(3));//是否存在